package org.japo.java.ui.components;

import java.awt.Graphics;
import java.awt.Image;
import javax.swing.JPanel;

public class PanelFondo extends JPanel {

    private Image imagen;

    public PanelFondo(Image imagen) {
        if (imagen != null) {
            this.imagen = imagen;
        }
    }

    @Override
    public void paint(Graphics g) {
        g.drawImage(imagen, 0, 0, getWidth(), getHeight(), this);
        setOpaque(false);
        super.paint(g);
    }
}
